﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;

namespace DataTier
{

    [DataContract(IsReference = true)]
    public class CreditCard
    {
        private int _creditCardId;
        private string _creditCardType;
        private string _cardNumber;
        private int _expiryMonth;
        private int _expiryYear;
        private int _cvc;

        public CreditCard(string creditCardType, string cardNumber, int expiryMonth, int expiryYear, int cvc, int creditCardId)
        {
            this._creditCardType = creditCardType;
            this._cardNumber = cardNumber;
            this._expiryMonth = expiryMonth;
            this._expiryYear = expiryYear;
            this._cvc = cvc;
            this._creditCardId = creditCardId;
        }

        [DataMember]
        public string CreditCardType
        {
            get { return _creditCardType; }
            set { _creditCardType = value; }
        }

        [DataMember]
        public string CardNumber
        {
            get { return _cardNumber; }
            set { _cardNumber = value; }
        }

        [DataMember]
        public int ExpiryMonth
        {
            get { return _expiryMonth; }
            set { _expiryMonth = value; }
        }

        [DataMember]
        public int ExpiryYear
        {
            get { return _expiryYear; }
            set { _expiryYear = value; }
        }

        [DataMember]
        public int CreditCardId
        {
            get { return _creditCardId; }
            set { _creditCardId = value; }
        }

        [DataMember]
        public int Cvc
        {
            get { return _cvc; }
            set { _cvc = value; }
        }
    }


}
